#define _CRT_SECURE_NO_WARNINGS 1
#include"list.h"
#include"vector.h"

void test_list_1()
{
	xhy::list<int> lt({ 1, 2, 3, 4 });

	xhy::list<int>::reverse_iterator lit = lt.rbegin();
	while (lit != lt.rend())
	{
		//*lit += 1;
		cout << *lit << " ";
		++lit;
	}
	cout << endl;

	const xhy::list<int> lt1(lt);
	xhy::list<int>::const_reverse_iterator lit1 = lt1.rbegin();
	while (lit1 != lt1.rend())
	{
		//*lit1 += 1;
		cout << *lit1 << " ";
		++lit1;
	}
	cout << endl;
}

void test_vector()
{
	xhy::vector<int> v = { 1, 2, 3, 4 };
	xhy::vector<int>::reverse_iterator vit = v.rbegin();
	while (vit != v.rend())
	{
		//*lit += 1;
		cout << *vit << " ";
		++vit;
	}
	cout << endl;

	const xhy::vector<int> v1(v);
	xhy::vector<int>::const_reverse_iterator vit1 = v1.rbegin();
	while (vit1 != v1.rend())
	{
		//*lit1 += 1;
		cout << *vit1 << " ";
		++vit1;
	}
	cout << endl;
}

int main()
{
	test_list_1();
	cout << endl;
	test_vector();

	return 0;
}